package com.llyb.tingshu.album.client;

import com.llyb.tingshu.album.client.impl.AlbumInfoDegradeFeignClient;
import com.llyb.tingshu.common.result.Result;
import com.llyb.tingshu.model.album.AlbumInfo;
import com.llyb.tingshu.model.album.BaseCategory1;
import com.llyb.tingshu.model.album.BaseCategoryView;
import com.llyb.tingshu.vo.album.AlbumStatVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 */
@FeignClient(value = "service-album", fallback = AlbumInfoDegradeFeignClient.class)
public interface AlbumInfoFeignClient {

    /**
     * 根据id查询所有专辑
     * @param albumId
     * @return
     */
    @GetMapping("/api/album/albumInfo/getAlbumInfo/{albumid}")
    Result<AlbumInfo> getAlbumInfo(@PathVariable("albumid") Long albumId);



    /**
     * 根据专辑id获取专辑统计信息
     * @param albumId
     * @return
     */
    @GetMapping("/api/album/albumInfo/getAlbumStat/{albumId}")
    Result<AlbumStatVo> getAlbumStat(@PathVariable("albumId") Long albumId);

    /**
     * 获取全部一级分类
     * @return
     */
    @GetMapping("api/album/category/findAllCategory1")
    Result<List<BaseCategory1>> findAllCategory1();

}